package service.impl;

import jms.JmsMs;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import dao.LoginDao;
import service.LoginService;
import vo.Store;


@Service("ls")
public class LoginServiceImpl implements LoginService{
	@Autowired(required=true)
	LoginDao ld;
	@Override
	public Store login(String mobile, String sailPasswd) {
		
		return ld.login(mobile,sailPasswd);
	}

	@Override
	@Transactional
	public Integer regist(Store sp) {
		System.out.println(sp.getEmail());
		int sid=0;
		sid=ld.add(sp);
		System.out.println("=========="+sid);
		JmsMs jm=new JmsMs();
		jm.sendVerify(sid);
		return ld.add(sp);
	}

}
